home *** CD-ROM | disk | FTP | other *** search
- /*************************************************************************************
- #
- TSpriteCollection.h
-
- This class represents a group of related Sprites. For example, all of the shots
- fired by a sprite. In general, the various things that happen to sprites (moving,
- drawing, hit testing) all happen to a whole group at a time.
- #
- #
- Author: Timothy Carroll
- Apple Developer Technical Support
- timc@apple.com
- #
- Modification History:
- #
- 8/15/96 TMC Initial Release
- #
- Copyright © 1996 Apple Computer, Inc., All Rights Reserved
- #
- #
- You may incorporate this sample code into your applications without
- restriction, though the sample code has been provided "AS IS" and the
- responsibility for its operation is 100% yours. However, what you are
- not permitted to do is to redistribute the source as "DSC Sample Code"
- after having made changes. If you're going to re-distribute the source,
- we require that you make it clear in the source that the code was
- descended from Apple Sample Code, but that you've made changes.
- #
- *************************************************************************************/
-
-
- #ifndef _TSpriteCollection_
- #define _TSpriteCollection_
-
- #pragma once
-
- #include "TSprite.h"
-
-
- #if PRAGMA_STRUCT_ALIGN
- #pragma options align=power
- #endif
-
- class TSpriteCollection
- {
- public:
- TSpriteCollection();
- ~TSpriteCollection();
- void AddSprite (TSprite *theSprite);
- void RemoveSprite (TSprite *theSprite);
-
- void ProcessSpriteGroup (void);
- void HitTest (TSpriteCollection *targetGroup);
- void DrawSpriteGroup (void);
-
- protected:
- TSprite *fSpriteListHead;
- };
-
- #if PRAGMA_STRUCT_ALIGN
- #pragma options align=reset
- #endif
-
- #endif /* _TSpriteCollection_ */